﻿using System;
using System.Data;
using System.Runtime.Serialization;
using System.ServiceModel;

namespace HRMService
{
    
    [ServiceContract(Namespace = "http://HRMService")]
    public interface ICFamily
    {
        [OperationContract]
        CFamilyInfo CFamily_GetInfo(int CFamilyID);

        [OperationContract]
        DataSet CFamily_GetList(out int ItemCount, int CandidateID, int currentPage, int pageSize);

        [OperationContract]
        int CFamily_Insert(CFamilyInfo eInfo);

        [OperationContract]
        bool CFamily_Update(CFamilyInfo eInfo);

        [OperationContract]
        bool CFamily_Delete(int CFamilyID);

        [OperationContract]
        bool CFamily_Exist(int CFamilyID, int CandidateID, string CFamilyNo);
    }
    [DataContract(Namespace = "http://HRMService")]
    public class CFamilyInfo
    {
        #region VARIABLES

        int _ID;
        int _CandidateID;
        string _Name;
        DateTime _DOB;
        string _Relationship;
        int _Age;
        string _Employment;
        string _Address;
        bool _IsDependent;

        #endregion

        [DataMember]
        public int ID
        {
            get { return _ID; }
            set { _ID = value; }
        }
        [DataMember]
        public int CandidateID
        {
            get { return _CandidateID; }
            set { _CandidateID = value; }
        }
        [DataMember]
        public string Name
        {
            get { return _Name; }
            set { _Name = value; }
        }
        [DataMember]
        public DateTime DOB
        {
            get { return _DOB; }
            set { _DOB = value; }
        }
        [DataMember]
        public string Relationship
        {
            get { return _Relationship; }
            set { _Relationship = value; }
        }
        [DataMember]
        public int Age
        {
            get { return _Age; }
            set { _Age = value; }
        }
        [DataMember]
        public string Employment
        {
            get { return _Employment; }
            set { _Employment = value; }
        }
        [DataMember]
        public string Address
        {
            get { return _Address; }
            set { _Address = value; }
        }
        [DataMember]
        public bool IsDependent
        {
            get { return _IsDependent; }
            set { _IsDependent = value; }
        }

    }

}
